Ordered list management in a replicated environment

ABSTRACT

Embodiments of the present invention provide a method, system and computer program product for ordered list management in a replication environment. In an embodiment of the invention, a method for ordered list management in a replication environment includes selecting an item for positioning in a replicant of an ordered list by an ordered list manager executing in memory by at least one processor of a computer. The method also includes determining an intent of positioning for the selected item and associating the determined intent in an order number with the selected item in the replicant of the ordered list. Finally, the method includes replicating the replicant with the ordered list by synchronizing changes in the replicant with other changes applied to other replicants of the ordered list.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to ordered list management and moreparticularly to ordered list management in a replicated environment.

Description of the Related Art

In mathematics, an ordered list is a sequence of elements arranged in aparticular order. The concept of an ordered list forms an integralcomponent of computing in that the establishment and maintenance of anordered list enjoys wide application across many different types ofcomputer programs. Maintaining an ordered list in a single userapplication involves nothing more than programmatically establishing adata structure in memory to accommodate an ordered list of a particularsize and populating the data structure with the requisite elements in aspecified order. To that end, an ordered list can be represented by anarray, a database table, or a linked list to name a few possiblerudimentary structures.

While managing an ordered list in a single user application can be oflittle consequence, managing an ordered list in a multi-user environmentcan be challenging. In this regard, in a multi-user environment, peerusers can access a single ordered list and add, delete, modify orre-order one or more elements in the ordered list. In the circumstancewhere each peer user applies changes to the ordered list in sequence,the changes can be applied incrementally so that no conflicts result.However, if peer users apply changes to an ordered list in parallel,conflicts can result. In a client-server environment, managing conflictsamongst changes to an ordered list by different users can be simple tothe extent that the changes are managed at the server acting as agatekeeper to the ordered list. Not so in a peer-to-peer environment.

U.S. Pat. No. 7,603,362 to Geoffrey John Elliot et al. for ORDERED LISTMANAGEMENT addresses the issue of peer to peer management of an orderedlist. In the Elliot patent, it is recognized that peer-to-peer filesharing networks—particularly as they relate to the sharing of musicplay lists—facilitate conflicts resulting from the parallel modificationof a play list. As suggested in the Elliot patent, a globally uniqueidentifier is appended to the path value of a position of an item in anordered list to enable simultaneous or near simultaneous modificationsto the ordered list without conflict. Further, an ordered list-specificseed value may be pre-pended to the path value of each item value toensure clustering of ordered list items when two or more ordered listsare merged.

Like a peer-to-peer computing environment, in a replication environmentordered lists can be modified or merged in parallel by different peerusers. Replication refers to the copying of data in two differentcomputing systems and the synchronization of the data so that onereplicated set of data is a mirror image of another from which thereplicated set of data had been created. Thus, in a replicationenvironment, one user can edit an ordered list locally by changing anordering of the list while another user can edit the same ordered listalso locally. During replication, the changes by each end user must bereconciled before merging the replicated ordered list into a singleordered list. Further, to the extent that different users modify itemsin a list separately in a replication environment, the orderingalgorithms for the ordered list execute separately resulting induplicate ordering numbers, mixing of items created by multiple usersand generally unpredictable ordering of the merged form of the orderedlists.

BRIEF SUMMARY OF THE INVENTION

Embodiments of the present invention address deficiencies of the art inrespect to ordered list management and provide a novel and non-obviousmethod, system and computer program product for ordered list managementin a replication environment. In an embodiment of the invention, amethod for ordered list management in a replication environment includesselecting an item for positioning in a replicant of an ordered list byan ordered list manager executing in memory by at least one processor ofa computer. The method also includes determining an intent ofpositioning for the selected item and associating the determined intentin an order number with the selected item in the replicant of theordered list. Finally, the method includes replicating the replicantwith the ordered list by synchronizing changes in the replicant withother changes applied to other replicants of the ordered list.

In one aspect of the embodiment, determining an intent of positioningfor the selected item includes determining an intent of positioning theselected item at an end of the ordered list, at a beginning of theordered list, or after an existing item in the ordered list. In theformer circumstance, associating the determined intent in an ordernumber with the selected item in the replicant of the ordered list caninclude retrieving a time stamp for the selected item contemporaneouswith the determination of the intent and incorporating the time stamp inthe order number. In the secondary circumstance, associating thedetermined intent in an order number with the selected item in thereplicant of the ordered list includes identifying a time stamp for afirst item in the ordered list and incorporating a time stamp earlierthan the identified time stamp in the order number. Finally, in thelatter circumstance, associating the determined intent in an ordernumber with the selected item in the replicant of the ordered listincludes identifying a time stamp for the existing item in the orderedlist, retrieving a time stamp for the selected item contemporaneous withthe determination of the intent, subtracting the retrieved time stampfrom a maximum time stamp value to produce a reversed time stamp value,and incorporating the identified time stamp and the reversed time stampvalue in the order number.

In another embodiment of the invention, a data processing systemproviding a replication environment can be configured for ordered listmanagement. The system can include a host computer with memory and atleast one processor and a replicant of an ordered list persisted in thememory. The system further can include an ordered list manager executingin the memory. When executing in memory, the ordered list manager canselect an item for positioning in the replicant, determine an intent ofpositioning for the selected item, associate the determined intent in anorder number with the selected item in the replicant of the orderedlist, and replicate the replicant with the ordered list by synchronizingchanges in the replicant with other changes applied to other replicantsof the ordered list.

Additional aspects of the invention will be set forth in part in thedescription which follows, and in part will be obvious from thedescription, or may be learned by practice of the invention. The aspectsof the invention will be realized and attained by means of the elementsand combinations particularly pointed out in the appended claims. It isto be understood that both the foregoing general description and thefollowing detailed description are exemplary and explanatory only andare not restrictive of the invention, as claimed.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute partof this specification, illustrate embodiments of the invention andtogether with the description, serve to explain the principles of theinvention. The embodiments illustrated herein are presently preferred,it being understood, however, that the invention is not limited to theprecise arrangements and instrumentalities shown, wherein:

FIG. 1 is a pictorial illustration of a process for ordered listmanagement in a replication environment;

FIG. 2 is a schematic illustration of a data processing system in areplication environment configured for ordered list management; and,

FIG. 3 is a flow chart illustrating a process for ordered listmanagement in a replication environment.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of the invention provide for ordered list management in areplication environment. In accordance with an embodiment of theinvention, an item can be added to an ordered list managed locally in areplication environment. The intent of positioning the item in theordered list can be determined relative to other items in the orderedlist, such as an intent to insert the item at an end of the orderedlist, after a specific item in the ordered list, or at the beginning ofthe list. An order number can be computed based upon the intent ofpositioning and associated with the item to be added to the orderedlist. Thereafter, subsequent to replication, merging other changes tothe ordered list performed elsewhere can be facilitated by identifyingan intent of positioning for each change in the ordered list.

In further illustration, FIG. 1 pictorially shows a process for orderedlist management in a replication environment. As shown in FIG. 1,different users 110A, 110B can manage respectively different replicants140A, 140B of an ordered list 120 stored in a host computing system 150by way of ordered list management logic 170. For each item 120A, 120Bpositioned in a corresponding replicant 140A, 140B of the ordered list120, an intent of positioning can be determined for the correspondingitem 120A, 120B and associated therewith as an order number 130A, 130B.

For example, if an item 120A, 120B is to be added to an end of acorresponding one of the replicants 140A, 140B, the intention toposition the item 120A, 120B at the end of the corresponding one of thereplicants can be specified in an order number 130A, 130B and associatedwith the item 120A, 120B. Likewise, if an item 120A, 120B is to be addedafter another item in one of the replicants 140A, 140B, the intention toposition the item 120A, 120B after the other item in the correspondingone of the replicants can be specified in an order number 130A, 130B andassociated with the item 120A, 120B. In this way, during a replicationprocess 160 in which the different replicants 140A, 140B aresynchronized with the ordered list 120, the intent of positioning foreach item in the replicants 140A, 140B can be considered during theprocess of merging all changes of the replicants 140A, 140B into theordered list 120.

The process described in connection with FIG. 1 can be implemented in adata processing system supporting replication of data. In yet furtherillustration, FIG. 2 schematically shows a data processing system in areplication environment configured for ordered list management. Thesystem can include a host computer 210 with at least one processor andmemory. An operating system 220 can execute in the host computer 210 andcan support the operation of a replication environment in whichapplication program logic manipulates, creates, retrieves and consumesreplicants of data manipulated, created, retrieved and consumed byothers in other computers. As is the case in a replication environment,periodically, the replicants are synchronized through a merger ofchanges to the replicants.

An ordered list manager 300 can operate in connection with thereplication environment 230 in the operating system 220. The orderedlist manager 300 can include program code that when executed in thecomputer 210 manages positioning of an item 250 in an ordered list 240by ascertaining an intent of positioning of the item 250 and associatingan order number reflecting the intent of positioning with the item 250in the ordered list 240. For instance, an order number 260 can bedetermined for the item 250 and associated with the item 250 to indicatean intent to place the item 250 at the beginning of the ordered list240, or at the end of the ordered list 240, or after a specific item inthe ordered list 240.

In this regard, an order number 260 providing for a time stamp relativeto other time stamps for other items of the ordered list 240 after(later than) other time stamps for other items of the ordered list 240can indicate an intent to place an associated item at the end of theordered list 240. Alternatively, placing in the order number 260 a leastrecent time stamp (earlier time stamp) relative to other time stamps forother items of the ordered list 240 can indicate an intent to place anassociated item at the beginning of the ordered list 240. Finally, anorder number 260 providing for the subtraction of a maximum time stampvalue from a time stamp for an existing item in the ordered list 240 toproduce a “reversed time stamp value” in order to indicate an intent toplace an associated item after the existing item in the ordered list240.

In all cases, the order number 260 preferably can include a time stampcontemporaneous to the determination of the intent for an associateditem, and any computed value requisite to expressing the intent. Forinstance, an exemplary time stamp Aug. 17, 2007 at 1:03 in the afternoonexpressing an intent to insert an item after an existing item with atime stamp of Apr. 5, 2007 at 12:23 in the afternoon can provide: ORDERNUMBER 2007-04-05-1223-7992-04-14-1097 wherein the maximum time stampvalue is 9999-12-31-2400 and the reverse time stamp value is7992-04-14-1097. To the extent that the order number becomes too large,the order number can be compressed, or the amount of data truncated byreducing the precision of the time stamp, for example by limiting thenotation of the year to only two digits, or by eliminating the year inits entirety. Alternatively, a base number system can vary to reduce thenumber of digits, for instance by adjusting the order number to ahexadecimal value.

In yet further illustration of the operation of the ordered list managerFIG. 3 is a flow chart illustrating a process for ordered listmanagement in a replication environment. Beginning in block 310, an itemcan be selected for ordering in an ordered list. For example, item canbe an existing item in the ordered list, or a new item to be added tothe ordered list. In block 320, the intent of positioning the item inthe ordered list can be determined, such as positioning the item at thebeginning of the ordered list, at an end of the ordered list, or afteran existing item in the ordered list. In block 330, a time stamp can beretrieved and in block 340, an order number reflective of the determinedintent can be computed based upon the time stamp. Finally, in block 350,the order number can be associated with or appended to the selecteditem. In this way, when replicating the ordered list, the order numbercan be accounted for in merging the changes of other replicants to theordered list.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, radiofrequency, and the like, or anysuitable combination of the foregoing. Computer program code forcarrying out operations for aspects of the present invention may bewritten in any combination of one or more programming languages,including an object oriented programming language and conventionalprocedural programming languages. The program code may execute entirelyon the user's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention have been described above withreference to flowchart illustrations and/or block diagrams of methods,apparatus (systems) and computer program products according toembodiments of the invention. In this regard, the flowchart and blockdiagrams in the Figures illustrate the architecture, functionality, andoperation of possible implementations of systems, methods and computerprogram products according to various embodiments of the presentinvention. For instance, each block in the flowchart or block diagramsmay represent a module, segment, or portion of code, which comprises oneor more executable instructions for implementing the specified logicalfunction(s). It should also be noted that, in some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts, or combinations of special purpose hardware andcomputer instructions.

It also will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks. The computer program instructions may also beloaded onto a computer, other programmable data processing apparatus, orother devices to cause a series of operational steps to be performed onthe computer, other programmable apparatus or other devices to produce acomputer implemented process such that the instructions which execute onthe computer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

Finally, the terminology used herein is for the purpose of describingparticular embodiments only and is not intended to be limiting of theinvention. As used herein, the singular forms “a”, “an” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. It will be further understood that the terms“comprises” and/or “comprising,” when used in this specification,specify the presence of stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated.

Having thus described the invention of the present application in detailand by reference to embodiments thereof, it will be apparent thatmodifications and variations are possible without departing from thescope of the invention defined in the appended claims as follows:

We claim:
 1. A method for ordered list management in a replicationenvironment comprising: selecting an item for positioning in a replicantof an ordered list by an ordered list manager executing in memory by atleast one processor of a computer, the replicant of the ordered listbeing a copy of an ordered list configured to be edited locally;determining an intent of positioning for the selected item relative toother items in the ordered list and also a time during which the intentis determined; creating a time stamp from the determined time;associating the determined intent with the selected item in thereplicant of the ordered list by computing an order number for thedetermined intent utilizing the time stamp for the selected item createdfrom the determined time, and associating the order number with theselected item by inserting into the order number, the time stamp and areverse time stamp comprising a maximum value for a year minus a year ofthe time stamp, a maximum value for a month minus a month of the timestamp, and a maximum value for a time minus a time of the time stamp;and, replicating the replicant with the ordered list by synchronizingchanges in the replicant with other changes applied to other replicantsof the ordered list.
 2. The method of claim 1, wherein determining theintent of positioning for the selected item, comprises determining anintent of positioning the selected item at an end of the ordered list.3. The method of claim 2, wherein associating the determined intent inthe order number with the selected item in the replicant of the orderedlist, comprises: identifying a time stamp for a last item in the orderedlist; and, incorporating a time stamp later than the identified timestamp in the order number.
 4. The method of claim 1, wherein determiningthe intent of positioning for the selected item, comprises determiningan intent of positioning the selected item at a beginning of the orderedlist.
 5. The method of claim 4, wherein associating the determinedintent in the order number with the selected item in the replicant ofthe ordered list, comprises: identifying a different time stamp for afirst item in the ordered list; and, creating the time stamp with a timethat is earlier than a time for the identified different time stamp. 6.The method of claim 1, wherein determining the intent of positioning forthe selected item, comprises determining an intent of positioning theselected item after an existing item in the ordered list.
 7. A dataprocessing system providing a replication environment and configured forordered list management, the system comprising: a host computer withmemory and at least one processor; a replicant of an ordered listpersisted in the memory, the replicant of the ordered list being a copyof an ordered list configured to be edited locally; and, an ordered listmanager executing in the memory to select an item for positioning in thereplicant, to determine an intent of positioning for the selected itemrelative to other items in the ordered list and also a time during whichthe intent is determined, to create a time stamp from the determinedtime, to associate the determined intent with the selected item in thereplicant of the ordered list by computing an order number for thedetermined intent utilizing the time stamp for the selected item createdfrom the determined time, and associating the order number with theselected item by inserting into the order number, the time stamp and areverse time stamp comprising a maximum value for a year minus a year ofthe time stamp, a maximum value for a month minus a month of the timestamp, and a maximum value for a time minus a time of the time stamp,and to replicate the replicant with the ordered list by synchronizingchanges in the replicant with other changes applied to other replicantsof the ordered list.
 8. The system of claim 7, wherein the ordered listmanager associates the determined intent to add the selected item at abeginning of the ordered list in the order number with the selected itemin the replicant of the ordered list by identifying a time stamp for afirst item in the ordered list, and incorporating a time stamp earlierthan the identified time stamp in the order number.
 9. A computerprogram product for ordered list management in a replicationenvironment, the computer program product comprising: a non-transitorycomputer readable storage medium having computer readable program codeembodied therewith, the computer readable program code when executed inmemory of a computer by at least one processor of a computer, performs amethod comprising: selecting an item for positioning in a replicant ofan ordered list by an ordered list manager executing in memory by atleast one processor of a computer, the replicant of the ordered listbeing a copy of an ordered list configured to be edited locally;determining an intent of positioning for the selected item relative toother items in the ordered list and also a time during which the intentis determined; creating a time stamp from the determined time;associating the determined intent with the selected item in thereplicant of the ordered list by computing an order number for thedetermined intent utilizing the time stamp for the selected item createdfrom the determined time, and associating the order number with theselected item by inserting into the order number, the time stamp and areverse time stamp comprising a maximum value for a year minus a year ofthe time stamp, a maximum value for a month minus a month of the timestamp, and a maximum value for a time minus a time of the time stamp;and, replicating the replicant with the ordered list by synchronizingchanges in the replicant with other changes applied to other replicantsof the ordered list.
 10. The computer program product of claim 9,wherein the determining of the intent of positioning for the selecteditem, comprises determining an intent of positioning the selected itemat an end of the ordered list.
 11. The computer program product of claim10, wherein the associating of the determined intent in the order numberwith the selected item in the replicant of the ordered list, comprises:identifying a time stamp for a last item in the ordered list; and,incorporating a time stamp later than the identified time stamp in theorder number.
 12. The computer program product of claim 9, wherein thedetermining of the intent of positioning for the selected item,comprises determining an intent of positioning the selected item at abeginning of the ordered list.
 13. The computer program product of claim12, wherein the associating of the determined intent in the order numberwith the selected item in the replicant of the ordered list, comprises:identifying a different time stamp for a first item in the ordered list;and, creating the time stamp with a time that is earlier than a time forthe identified different time stamp.
 14. The computer program product ofclaim 9, wherein the determining of the intent of positioning for theselected item, comprises determining an intent of positioning theselected item after an existing item in the ordered list.